import {defineUserConfig} from 'vuepress'
import type {DefaultThemeOptions} from 'vuepress'

export default defineUserConfig<DefaultThemeOptions>({
  // 站点配置
  lang: 'zh-CN',
  title: 'mccbts-help',
  description: '中冶宝钢信息系统帮助文档',

  head: [['link', { rel: 'icon', href: '/images/help.png' }]],

  // 主题和它的配置
  theme: '@vuepress/theme-default',
  themeConfig: {
    logo: '/images/help.png',
    logoDark: '/images/help-dark.png',
    navbar: [
      {
        text: '首页',
        link: '/',
        activeMatch: '^/$',
      },
      // OA
      // {
      //   text: 'OA',
      //   link: '/help/oa.md',
      //   activeMatch: '/help/oa.html',
      // },
      // VPN
      {
        text: 'VPN',
        link: '/help/vpn.md',
        activeMatch: '/help/vpn.html',
      },
      // 单兵
      {
        text: '单兵系统',
        link: '/help/danbing.md',
        activeMatch: '/help/danbing.html',
      },
    ],
    editLink: false,
    // 404 页面的提示信息
    notFound: ['您访问的页面正在建设中...'],
    // 404 页面中 返回首页 链接的文字
    backToHome: '返回首页'

  },

  // 插件配置
  plugins: [
    [
      '@vuepress/plugin-search',
      {
        // 排除首页
        isSearchable: (page) => page.path !== '/',
        locales: {
          '/': {
            placeholder: 'Search',
          },
          '/zh/': {
            placeholder: '搜索',
          },
        },
      },
    ],
  ],
})
